package com.kingyea.mobilepolice.user.client;

import com.kingyea.mobilepolice.apimanage.utils.page.PageInfo;
import com.kingyea.mobilepolice.organization.bean.Organization;
import com.kingyea.mobilepolice.system.Result;
import com.kingyea.mobilepolice.user.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "auth-server")
public interface UserServiceClient {

    /**
     * 不需要分页
     *
     * @param map
     * @return
     */
    @RequestMapping(value = "/user/list", method = RequestMethod.POST)
    Result<PageInfo<User>> list(Map<String, Object> map);

    @RequestMapping(value = "/user/getCurrentUserInfo", method = RequestMethod.GET)
    Result<User> getCurrentUserInfo();

    @RequestMapping(value = "/organization/getBySerialNo", method = RequestMethod.POST)
    Result<Organization> getOrgBySerialNo(@RequestParam(value = "serialNo") String serialNo);
}
